package com.ankicoo.practice.study;

import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.SimpleEvaluationContext;

/**
 * Description:
 *
 * @author : QCYANG
 * @date : 2022/9/22 11:46
 */
public class SpringSpel {
    public static void main(String[] args) {
        SpelExpressionParser parser = new SpelExpressionParser();
        SimpleEvaluationContext context = SimpleEvaluationContext.forReadOnlyDataBinding().build();
        String value = parser.parseExpression("1+2*(3+7)").getValue(context, String.class);
        System.out.println(value);
    }
}
